from pathlib import Path
from typing import Literal, Optional

project_dir = Path(__file__).parent

class Config:
    class Path:
        project_dir = project_dir
        data_dir = project_dir / 'data'
        dataset_dir = data_dir / 'Telecom_Fraud_Texts_5'
        dataset_filenames = [f'label0{i}-last.csv' for i in range(5)]
        dataset_cache = data_dir / 'preprocessing.pkl'

    class Train:
        max_length: int = 96
        model_name: str = 'bert-base-chinese'
        batch_size: int = 64
        epochs: int = 2
        amp: Optional[Literal['float32', 'bfloat16']] = 'float16'
        optimizer: Literal['Adam', 'AdamW'] = 'AdamW'
        learning_rate_config = {
            'Adam': 2e-5,
            'AdamW': 1e-5
        }

